import sounddevice as sd
from scipy.io.wavfile import write

fs = 44100
seconds = 5
sd.default.samplerate = fs
sd.default.channels = 1

print("recording....please")
myrecording = sd.rec(int(seconds*fs))
sd.wait()
write('output.wav',fs,myrecording)
